var basicUrl = '/api'
export const request =(options={})=>{
    return new Promise((resolve,rejects)=>{
        uni.request({
            url: basicUrl + options.url,
            method: options.method,
            data: options.data,
            success: (response) => {
                // console.log("options: ",options);
                return resolve(response.data)
            },
            fail: (fail) => {
                console.log('fail',fail)
                return reject(fail);
            }
        })
    })
}